package com.ruoyi.personal.controller;


import com.ruoyi.personal.domain.UserPhoneVO;
import com.ruoyi.personal.service.IPhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("phone")
public class PhoneController {

    @Autowired
    IPhoneService phoneService;

    @GetMapping
    public List<UserPhoneVO> phone() {
        return phoneService.getAllPhone();
    }

    @PutMapping
    public Boolean updatePhone(@RequestBody UserPhoneVO userPhoneVO) {
        return phoneService.updatePhone(userPhoneVO);
    }
}
